/**
 * 
 * SHELL VIEW , for section switching...
 * 2009-11-10
 * 
 * 
 * */
package core.section.shell
{
	import core.section.SectionView;
	
	import flash.display.DisplayObject;
	import flash.display.DisplayObjectContainer;
	import flash.display.Sprite;

	public class ShellView extends SectionView
	{
		//START...
		
		//PROPERTY...
		
		protected var container:Sprite;
			
		
		//CONSTRUCTOR...
		public function ShellView(_target:DisplayObject)
		{
			super(_target);
		}
		
		//METHODS...
		
		//override on display...
		public override function display():void
		{
			
			container = (target as DisplayObjectContainer).getChildByName("container") as Sprite;			
			
			onResize();
			
		}
		
		//add section...
		public function addSection(section:DisplayObject):void
		{
			
			container.addChildAt(section,0);
			
			onResize();
								
		} 		
		
		
		//remove section...
		public function removeSection(section:DisplayObject):void
		{
			
			if(section && container.contains(section))
			{
		
				container.removeChild(section);
		
			}
		
		}
		
		
		//show loading...
		public function showLoadingBar():void
		{
			
			// to do...need to be override in sub class	
			
		}
		
		
		//hide loading...
		public function hideLoadingBar():void
		{
			
			// to do...
			
		}
		
		
		//show progress...
		public function showProgress(progress:Number):void
		{
			
			// to do...
			
		}
		
		
		//END...
	}
}